/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Server.lastproject;

import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JTable;

/**
 *
 * @author CANG
 */
public class RowDataStructListener extends MouseAdapter
{
    private JTable  _jtDataStruct = null;
    private MyPopupMenu_RowData menu;
    
    public RowDataStructListener(JTable jTableRowData, ServerForm server, String NameTable)
    {
        menu = new MyPopupMenu_RowData(jTableRowData, server, NameTable);
        _jtDataStruct = jTableRowData;
    }
    
    public void mouseReleased(MouseEvent e)
    {        
        if(e.isPopupTrigger())
        {            
            showPop(e);
        }
    }
    
    private void showPop(MouseEvent e)
    {
        
        menu.show(e.getComponent(), e.getX(), e.getY());
    }
    
    public void setNameTable(String nameTable)
    {
        menu.setNameTableOwner(nameTable);
    }
}
